package com.correo.socket.server.run;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

import com.correo.socket.server.ServerSocketAdmin;

public class ServerSocketThread implements Runnable{

	
	@Override
	public void run() {
		Socket s1;
		ServerSocket ss =  null;
		try {
			ss = new ServerSocket(10200);
		} 
		catch (IOException e1) 
		{
			e1.printStackTrace();
		}
		while(true)
		{
			try
			{
				s1 = ss.accept();
				Thread thread = new Thread(new ServerSocketAdmin(s1));
				thread.start();
			}
			catch (IOException e)
			{
				e.printStackTrace();
			}
		}
		
	}

}
